Useful links : Invite Your Friends | Recover password |  Advertising in CM | Join Carding Class


Results 1 to 6 of 6
  1. #1

    Hot [VB.NET] SerialGen (For Registering Product) [Source]

    You can not watch the Post Because You are a Visitor
    If you have already an account at Card Mafia   Do log in as Member

    To complete
    &  You can register a new account

    Totally FREE
    --

    click Here )
    Nickname
    Password





















  2. Ad expire 17 February 2020

  3. #2
    The link is dead

  4. #3

    Use This Code Here

    Getting the MAC Address and Generating the Serial Number

    The first step is to get the MAC address of the client's machine. This could be achieved by using the ManagementClass class located in the System.Management assembly. We have to add a reference to that assembly to our project, and import it into SecurityManager.vb, which will be the class in which we place the GetSerial() and CheckKey() functions. These two functions will be responsible for generating the serial number from the MAC address and checking whether the key entered by the user is valid. As a first step, we define the GetSerial() function as follows:

    Code:
    Public Function GetSerial() As Long
        Dim mc As New ManagementClass("Win32_NetworkAdapterConfiguration")
        Dim mac As String = ""
        'Getting network adapters collection
        Dim moc As ManagementObjectCollection = mc.GetInstances
    
        'Here we iterate over available network adapters, 
        'picking the first possible one
        For Each mo As ManagementObject In moc
            If mo.Item("IPEnabled") Then
                mac = mo.Item("MacAddress").ToString
                Exit For
            End If
        Next
    
        mc.Dispose()
    
        'This is a simple function that we use to get a serial out
        'of our MAC address. Say that x is the MAC and y is the serial,
        'the function would be y += x[i] + (i * 2) where i is the index
        'of MAC address element.
        Dim sum As Long = 0
        Dim index As Integer = 1
        For Each ch As Char In mac
            If Char.IsDigit(ch) Then
                sum += sum + Integer.Parse(ch) * (index * 2)
            ElseIf Char.IsLetter(ch) Then
                Select Case ch.ToString.ToUpper
                    Case "A"
                        sum += sum + 10 * (index * 2)
                    Case "B"
                        sum += sum + 11 * (index * 2)
                    Case "C"
                        sum += sum + 12 * (index * 2)
                    Case "D"
                        sum += sum + 13 * (index * 2)
                    Case "E"
                        sum += sum + 14 * (index * 2)
                    Case "F"
                        sum += sum + 15 * (index * 2)
                End Select
            End If
    
            index += 1
        Next
    
        Return sum
    End Function
    This function will give us the unique serial number of each MAC address (not totally unique, but similar to hash function uniqueness).
    Generating Activation Key from the Serial Number

    The second step is to create the key generator which will generate the activation key from a given serial number. This generator will be placed in a class called KeyGenerator. This class will contain a function which will apply a simple mathematical function on the serial number to get the activation key. In this case, I will use the function f(x) = x2 + 53/x + 113 * (x/4).


    Code:
    Public Class KeyGenerator
        Public Function GenerateKey(ByVal serial As Long) As Long
            Dim x As Long = serial
            Return x * x + 53 / x + 113 * (x / 4)
        End Function
    End Class
    Back to SecurityManager.vb, we need to add one more function, which is CheckKey(). This function will take the activation key as a parameter, apply the key-generating function on the current MAC address, then compare the two keys to see whether they match or not.


    Code:
    Public Function CheckKey(ByVal key As Long) As Boolean
        Dim x As Long = GetSerial()
        Dim y As Long = x * x + 53 / x + 113 * (x / 4)
        Return y = key
    End Function
    One important note left: do not place all of these classes in your client's solution! Remember that the key-generating class is only owned by you.
    Happy coding!

  5. #4

  6. #5
    link is dead.................

  7. #6

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

CardMafia Official twitter AccountCardMafia Official Telegram Channel

CardMafia Official Youtube Channel

The administration is not responsible for the actions of users. The information on this site is for informational purposes only. Contact us at [email protected] for removal of any objectionable material.
logo